import json


from constr_budgets.models import Remarks
from django.http import JsonResponse
from django.views import View


# 项目数据接口
class RemarksView(View):
    def put(self, request):
        data = json.loads(request.body)
        print(data)
        aimremark = Remarks.objects.filter(id=data["id"])
        aimremark.update(**data)
        return JsonResponse({
            'code': 200,
            "message": "修改备注信息成功"
        })

